home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1002 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.4 KB

  1. Date: Sun, 13 Feb 94 01:20:19 PST
  2. From: hyc@terminator.rs.itd.umich.edu (Howard Chu)
  3. Message-Id: <9402130920.AA05453@hanauma.jpl.nasa.gov>
  4. To: mint@atari.archive.umich.edu
  5. Subject: user-written interrupt handlers
  6.  
  7. Boy do I feel stupid... Here I am, pondering how to write a new GEMDOS function
  8. that will allow an interrupt handler to send a signal to a user process, when
  9. it suddenly hits me - if the interrupt occurs while we're already in the kernel,
  10. we get the original TOS trap handlers. Sheesh!
  11.  
  12. About the only thing I can think of now is to doctor up the Setexc XBIOS call,
  13. so that it wraps a bit of code around whatever the user supplies. But, in
  14. that case, the actual address that the interrupt vector points to will be
  15. different from the address of the user-supplied routine, possibly causing more
  16. confusion. The actual wrapper just needs to build a context and see if we're in
  17. the kernel. If so, remember it and leave the kernel, then call the user routine,
  18. and re-enter the kernel if necessary, before returning...
  19.  
  20. Without this check, there's no way a user-supplied interrupt handler can be
  21. sure of having MiNT's services available at interrupt time. Trying to solve
  22. the problem any other way would seem to require the user code to muck around
  23. trying to decode MiNT's symbol table to find the very same info...
  24.  
  25. Comments? Should Setexc be munged in MiNT, or should this be a new function,
  26. or is there a better way?
  27.